package dbz.domain.dtos;

import java.util.ArrayList;
import java.util.List;

import dbz.domain.Card;
import dbz.domain.hand.Hand;

public class HandDTO {

	CardDTO[] cards;
	
	public HandDTO(Hand hand) {
		List<CardDTO> cardsDTO = new ArrayList<CardDTO>();
		for (Card card : hand.getCards()) {
			cardsDTO.add(new CardDTO(card));
		}
		cards = cardsDTO.toArray(new CardDTO[0]);
	}

	public CardDTO[] getCards() {
		return cards;
	}

	public void setCards(CardDTO[] cards) {
		this.cards = cards;
	}
}
